# By Daoyu @2010-07-07

from django.conf.urls.defaults import *
from django.contrib.auth.views import password_change

from uncle import settings

urlpatterns = patterns('uncle.users',
    (r'^new/$', 'views.new_user'),
    
    (r'^videos/$', 'views.manage_video'),
    (r'^videos/delete/(\d+)/$', 'views.delete_video'),
    
    (r'^register/$', 'views.register'),
    (r'^delete/$', 'views.delete_user'),
    (r'^edit/$', 'views.edit_user'),
#    (r'^(\d+)/edit/$','views.edit_user'),
#    (r'^(\d+)/edit/all/$','views.edit_all_user'),                       
    (r'^edit/all/$', 'views.edit_all_user'),
    
    (r'^search/$', 'search.search'),
    (r'^search/cats/$', 'search.search_by_category'),
    (r'^search/abc/$', 'search.search_abc'),
    (r'^search_video/$', 'search.search_video'),
    
    
    (r'^upload/$', 'detail.upload_video'),
    (r'^note/(\d+)/$', 'detail.change_note'),
    (r'^customer_skills/(\d+)/$', 'detail.change_customer_skills'),
    
    (r'^requests/$', 'detail.get_upload_request'),
    (r'^request/delete/(\d+)/$', 'detail.delete_upload_request'),
    
    (r'^category/$', 'tags.manage_category'),
    (r'^category/new/$', 'tags.new_cat'),
    (r'^category/delete/$', 'tags.delete_cat'),
        
    (r'^basket/$', 'basket.manage'),
    (r'^basket/new/$', 'basket.manage'),
    (r'^basket/add/$', 'basket.add'),
    (r'^basket/delete/(\d+)/$', 'basket.delete_basket'),
    (r'^basket/video/delete/(\d+)/$', 'basket.delete_basket_video'),
    
    (r'^emails/$', 'email.list'),
    (r'^email/(\d+)/$', 'email.send'),
    
    (r'^updates/$', 'update.get_updates'),
    (r'^sneak/$', 'update.sneak_pwd'),
    (r'^password/$', password_change, {'post_change_redirect':'/'}),
    
    (r'^(\d+)/$', 'detail.show_detail'),
    (r'^(\d+)/request/$', 'detail.send_upload_request'),
    
)
